package com.atguigu.tingshu.album.api;

import com.atguigu.tingshu.album.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: atguigu
 * @create: 2025-07-30 11:28
 */
@RestController
@RequestMapping("/api/album/test")
public class TestController {


    @Autowired
    private TestService testService;


    @GetMapping("/read/{id}")
    public String read(@PathVariable("id") Long id) {
        testService.read(id);
        return "success";
    }

    @GetMapping("/write/{id}")
    public String write(@PathVariable("id") Long id) {
        testService.write(id);
        return "success";
    }
}
